package com.java.service.impl;

import com.java.dao.TagMapper;
import com.java.model.Result;
import com.java.model.Tag;
import com.java.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TagServiceImpl implements TagService {

    @Autowired
    TagMapper tagMapper;

    @Override
    public List<Tag> list() {
        return tagMapper.list();
    }

    @Override
    public List<Tag> tagList() {
        return tagMapper.tagList();
    }

    @Override
    public Result tagCount() {
        List<Tag> tagCount = tagMapper.tagCount();
        return Result.success(tagCount,null);
    }

    @Override
    public Result get(int id) {
        Tag tag = tagMapper.get(id);
        return Result.success(tag,null);
    }
}
